package com.mairuide.datalog;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.mairuide._frame.base.BaseModel;

/**
 * 数据操作日志详情表
 * @author mh
 *
 */
@Entity
@Table(name="tb_data_operation_detail_log")
public class DataOperationDetailLog extends BaseModel{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 日志详情id
	 */
	@Id
	@Column(name="ID")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "data_operation_detail_log")
	@SequenceGenerator(name = "data_operation_detail_log", sequenceName = "SEQ_OPERATION_DETAIL_LOG",allocationSize=1)
	private int detailId;
	
	/**
	 * 父类日志id
	 */
	@Column(name="parent_log_id")
	private Integer parentLogId;
	
	/**
	 * 表字段
	 */
	@Column(name="field")
	private String field;
	
	/**
	 * 字段名
	 */
	@Column(name="field_name")
	private String fieldName;
	
	/**
	 * 新值
	 */
	@Column(name="new_value")
	private String newValue;
	
	/**
	 * 旧值
	 */
	@Column(name="old_value")
	private String oldValue;
	
	/**
	 * 是否删除(0:未删除；1:已删除)默认未删除
	 */
	@Column(name="is_delete")
	private Integer isDelete = 0;
	
	public int getDetailId() {
		return detailId;
	}

	public void setDetailId(int detailId) {
		this.detailId = detailId;
	}

	public Integer getParentLogId() {
		return parentLogId;
	}

	public void setParentLogId(Integer parentLogId) {
		this.parentLogId = parentLogId;
	}

	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	public String getNewValue() {
		return newValue;
	}

	public void setNewValue(String newValue) {
		this.newValue = newValue;
	}

	public String getOldValue() {
		return oldValue;
	}

	public void setOldValue(String oldValue) {
		this.oldValue = oldValue;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

}
